package com.caishi.lkx.exam.service;

import com.caishi.lkx.exam.model.ExamModel;
import com.caishi.lkx.exam.vo.IndexIndustryData;
import com.zzw.common.entity.BaseService;
import com.zzw.common.service.NameService;
import com.zzw.common.service.service.SortService;
import com.caishi.lkx.exam.dto.UserPermissionDto;


import java.util.List;

public interface IExamService extends BaseService<ExamModel, String>, SortService<ExamModel>, NameService<ExamModel, String> {

    /**
     * 查询行业下的考试
     *
     * @param industryId
     * @return
     */
    List<ExamModel> industryExam(String industryId);

    /**
     * 查询用户有权限的考试d
     *
     * @param userId
     * @return
     */
    UserPermissionDto<String> userHaveExam(Long localGroupId, Long userGroupId, String userId);

    /**
     * 根据考试ids获取行业ids
     *
     * @param examIds
     * @return
     */
    UserPermissionDto<String> userHaveIndustry(UserPermissionDto<String> userExam);

    /**
     * 获取机构开通的考试权限
     *
     * @param localGroupId
     * @param userGroupId
     * @param userId
     * @return
     */
    List<String> groupPermission(Long localGroupId, Long userGroupId, String userId);

    /**
     * 首页考试数据
     *
     * @param examModel
     * @return
     */
    IndexIndustryData.Exam indexExamData(ExamModel examModel, boolean async);
}
